<%@ page import="com.model.TeacherInfo" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>学生管理系统</title>
    <style>tr{height:50px;}
    .input{
        font-size: 14px;
        width:50%;
        height:25px;
        border-radius:5px;
        box-shadow:0;
    }
    .td{
        width:150px;
    }
    td{
        padding-left:40px;
    }</style>
    <script type="text/javascript" src="js/Calendar3.js"></script>
</head>
<jsp:include page="islogin.jsp"></jsp:include>
<jsp:useBean id="teacherServerInfo" class="com.jdbc.DAO.TeacherInfoServer"></jsp:useBean>
<body>
<%  int teacher_id = Integer.parseInt(request.getParameter("teacher_id"));
    TeacherInfo tea = teacherServerInfo.queryTeacherById(teacher_id);
%>
<center>
    <form action="modifyOneTeacher_result.jsp" method="post">
        <table bgcolor="#fff" width="50%" cellspacing="0" >
            <tr>
                <td align="center" bgcolor="#f4f4f4" colspan="2">修改教师信息</td>
            </tr>
            <tr>
                <td>姓名：</td>
                <td><input type="text" name="teacher_name" class="input" value="<%=tea.getTeacher_name() %>"/></td>
            </tr>
            <tr>
                <td>性别：</td>
                <td><input type="radio" name="teacher_sex" value="1" <%if(tea.getTeacher_sex()==1){ %> checked <%} %>/>男&nbsp;&nbsp;&nbsp;
                    <input type="radio" name="teacher_sex" value="0" <%if(tea.getTeacher_sex()==0){ %> checked <%} %>/>女</td>
            </tr>
            <tr>
                <td>出生日期：</td>
                <td><input name="teacher_birthday" type="text"class="input" maxlength="10" onclick="new Calendar().show(this);" readonly="readonly" value="<%=tea.getTeacher_birthday() %>" />
                </td>
            </tr>
            <tr>
                <td>教授课程：</td>
                <td><select name="teacherCourseArray" size="3" multiple="multiple"  class="input" style="height:60px;">
                    <option <%if(tea.getTeacher_course().contains("计算机导论")){ %> selected="selected" <%} %>>计算机导论</option>
                    <option <%if(tea.getTeacher_course().contains("数据结构")){ %> selected="selected" <%} %>>数据结构</option>
                    <option <%if(tea.getTeacher_course().contains("计算机原理")){ %> selected="selected" <%} %>>计算机原理</option>
                    <option <%if(tea.getTeacher_course().contains("操作系统")){ %> selected="selected" <%} %>>操作系统</option>
                    <option <%if(tea.getTeacher_course().contains("计算机网络")){ %> selected="selected" <%} %>>计算机网络</option>
                    <option <%if(tea.getTeacher_course().contains("大学物理")){ %> selected="selected" <%} %>>大学物理</option>
                </select></td>
            </tr>
            <tr>
                <td>备注：</td>
                <td><textarea rows="6" cols="50" name="teacher_beizhu" class="input" style="height:70px;"><%=tea.getTeacher_beizhu() %></textarea></td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <input type="hidden" name="id" value="<%=tea.getTeacher_id() %>" />
                    <input type="submit" value="提交" style="height:30px;width:50px;border-radius:5px;background-color: #eee"/>&nbsp;&nbsp;
                    <input type="reset" value="重置" style="height:30px;width:50px;border-radius:5px;background-color: #eee"/></td>
            </tr>
        </table>
    </form>
</center>
</body>
</html>